private _objs = player nearObjects 1000;

//
private _obj_box = objNull;

diag_log "开始输出";
{
	//diag_log (typeOf _x);
	if(typeOf _x == "CargoNet_01_box_F") then
	{
		_obj_box = _x;
	};
		
}forEach _objs;
_objs deleteAt (_objs find _obj_box) ;


if(isNull _obj_box) exitWith{systemChat "请放置补给箱";};

private _objs_man = []; 


//坐标偏移
private _pos_offset = getPosASL _obj_box;

private _str_line = "";
private _pos_obj;
{
	if(_x isKindOf "Man") then
	{
		_objs_man pushBack _x;	
	}
	else
	{
		_pos_obj = (getPosASL _x);
		_pos_obj set [0, (_pos_obj select 0) - (_pos_offset select 0)];
		_pos_obj set [1, (_pos_obj select 1) - (_pos_offset select 1)];
		_pos_obj set [2, (_pos_obj select 2) - (_pos_offset select 2)];
		
		_str_line = format["['%1',[%2,%3,%4],%5,%6,%7,%8],",
		typeOf _x,
		_pos_obj select 0,
		_pos_obj select 1,
		_pos_obj select 2,
		getDir _x,
		count crew _x > 0,
		damage _x,
		fuel _x];	
		diag_log _str_line;
	};
}forEach _objs;

//输出人

{
	if(!isPlayer _x) then
	{	
		_str_line = "";
		_str_line = _str_line + typeOf _x;
		diag_log _str_line;
	};
}forEach _objs_man;

diag_log "结束输出";




